package com.itheima.define;

public class ArraySum {
    public static void main(String[] args) {
        //某部门业绩总和
        int[] arr = {10, 20, 30};
        //求总和
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        System.out.println("总和为：" + sum);
    }
}
